import { observable, action } from 'mobx-miniprogram'
import { getStorage } from '../utils/storage'
export const userStore = observable({
  token: getStorage('token') || '',
  userInfo: getStorage('UserInfo') || {},
  setToken: action(function(val){
    this.token = val
  }),
  setUserInfo: action(function(val){
    this.userInfo = val
  })
})